package oc.tm.sg.admin.web.service.impl;

import org.smart4j.framework.tx.annotation.Service;

import oc.tm.sg.admin.govern.BootstrapGovern;
import oc.tm.sg.admin.web.service.UnregisterService;
import oc.tm.sg.registry.common.URL;

/**
 * 取消注册控制器
 * @author lry
 */
@Service
public class UnregisterServiceImpl implements UnregisterService {
	BootstrapGovern registryContainer=BootstrapGovern.INSTANCE;
    /**
     * 取消注册
     * @param provider
     * @return
     */
    public void unregister(String provider) {
        URL providerUrl = URL.valueOf(provider);
        registryContainer.getRegistry().unregister(providerUrl);
    }
}
